// 进入不同页面，对应的链接会变色
document.addEventListener("DOMContentLoaded", function () {
    var path = window.location.pathname;
    var pathToId = {
        "/history": "history-link",
        "/favorite": "favorite-link",
        "/cache": "cache-link",
    };
    var currentId = pathToId[path];
    if (currentId) {
        document.getElementById(currentId).classList.add("active");
    }
});
